package com.taotao.thread.Test1;

/**
 * @author wangjin
 * @title: Test4
 * @projectName thread
 * @description: TODO
 * @date 2022/5/3 0003 15:08
 */
public class Test4 implements Runnable{
    private  static volatile int count=100;
    @Override
    public  /*synchronized*/ void run() {

        count--;
        System.out.println(Thread.currentThread().getName()+" count ="+count);
    }

    public static void main(String[] args) {
        Test4 test4 = new Test4();
        for (int i = 0; i <100 ; i++) {
            new Thread(test4,"THREAD"+i ).start();
        }
    }
}
